<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Settings</title>

    <link href="https://fonts.googleapis.com/css?family=PT+Serif|Open+Sans" rel="stylesheet">
    <!--<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">-->
    <link href="styles/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="scss/utils/Main.css">
    <link rel="stylesheet" href="scss/utils/Admin.css">

</head>
<body class="has-admin-nav has-admin-aside has-admin-footer">
<main role="main">
    <section class="admin-navbar">
        <div class="container">
            <ul class="nav nav-pills" role="tablist">
                <li role="presentation"><a href="AdminIndex.html">Campaigns</a></li>
                <li role="presentation"><a href="AdminStats.html">Stats</a></li>
                <li role="presentation"><a href="AdminStores.html">Stores</a></li>
                <li role="presentation"><a href="AdminProfits.html">Profits</a></li>
                <li role="presentation" class="active"><a href="AdminSettings.html">Settings</a></li>
                <li role="presentation"><a href="AdminSubaccounts.html">Subaccounts</a></li>
                <li role="presentation"><a href="AdminCoupons.html">Coupons</a></li>
            </ul>
        </div>
    </section>

    <section class="admin-content">
        <div class="container">
            <div class="box">
                <div class="navbar navbar-fill-center">
                    <ul class="nav navbar-nav" role="tablist">
                        <li role="presentation" class="active"><a href="AdminSettings.html">Password</a></li>
                        <li role="presentation"><a href="AdminSettingsAnalytics.html">Analytics</a></li>
                        <li role="presentation"><a href="AdminSettingsSocialAccounts.html">Social accounts</a></li>
                        <li role="presentation"><a href="AdminSettingsCampaignSettings.html">Campaign settings</a></li>
                        <li role="presentation"><a href="AdminSettingsPayoutSettings.html">Payout settings</a></li>
                    </ul>
                </div>
                <div class="setting-content">
                    <h3 class="setting-title">Password</h3>
                    <div class="setting-body">
                        <div class="row">
                            <form action="" class="col-xs-12 col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2" id="setting-password">
                                <div class="form-group">
                                    <div class="row">
                                        <div class="col-xs-12 col-sm-3 col-sm-offset-1">
                                            <label class="control-label">Current password</label>
                                        </div>
                                        <div class="col-xs-12 col-sm-8">
                                            <input type="text" class="form-control" name="current_password">
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="row">
                                        <div class="col-xs-12 col-sm-3 col-sm-offset-1">
                                            <label class="control-label">New password</label>
                                        </div>
                                        <div class="col-xs-12 col-sm-8">
                                            <input type="password" class="form-control" name="new_password" id="new_password">
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="row">
                                        <div class="col-xs-12 col-sm-3 col-sm-offset-1">
                                            <label class="control-label">New password</label>
                                        </div>
                                        <div class="col-xs-12 col-sm-8">
                                            <input type="password" class="form-control" name="reconfirm_password" placeholder="Reconfirm your password">
                                        </div>
                                    </div>
                                </div>
                                <div class="form-actions">
                                    <div class="row">
                                        <div class="col-sm-8 col-sm-offset-4">
                                            <button type="submit" class="control-btn btn btn-fill-primary PTSerif btn-animate-fade" style="margin-top: 5px;margin-bottom:86px;">Save</button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

</main>


<script src="lib/jquery.1.12.4.min.js"></script>
<script src="lib/bootstrap.min.js"></script>
<script src="lib/jquery.validate.min.js"></script>
<script src="scripts/index.js"></script>
<script>
    $(function($){
        validatorFormEasy({
            container:this,
            rules:{
                current_password:{
                    required:true,
                    remote: { // 详细介绍 https://jqueryvalidation.org/remote-method/
                        url: "json/currentPassword.txt",
                        type: "post",
                        data: {
                            current_password: function() {
                                return $( "[name=current_password]" ).val();
                            }
                        }
                    }
                },
                new_password:{
                    required:true
                },
                reconfirm_password:{
                    required:true,
                    equalTo:"#new_password"
                }
            },
            callback:function(params){
                delete params["reconfirm_password"];
                console.log(params);
                validator.resetForm();
            }
        });
    })
</script>
</body>
</html>